<?php
/**
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 */	
defined ('IN_AGORA') or die;

class TaskController extends AgoraAdminController {
	function loadModel() {
		$this->model = Model::getInstance('ConvertersModel');
	}
	
	function _default() {
		$this->view->template = 'maintenance/converters';
	}
	
	function kunena() { 	
		$this->model->start();
		$this->model->detect_kunena();
		$this->model->export_users_kunena();
		$this->model->export_forums_kunena();
		$this->model->export_posts_kunena();
		$this->model->export_subscriptions_kunena();
		$this->model->end();
		
		Agora::showMessage(Agora::lang('SUCCESS CONV'));
		$this->view->template = 'maintenance/converters';
	}
	
	function ccboard() {
		$this->model->start();
		$this->model->export_users_ccboard();
		$this->model->export_forums_ccboard();
		$this->model->export_posts_ccboard();
		$this->model->end();
		
		Agora::showMessage(Agora::lang('SUCCESS CONV'));
		$this->view->template = 'maintenance/converters';
	}
	
	function sforum() {
		$this->model->start('sf');
		$this->model->export_users_sforum();
		$this->model->export_forums_sforum();
		$this->model->export_posts_sforum();
		$this->model->end();
		
		Agora::showMessage(Agora::lang('SUCCESS CONV'));
		$this->view->template = 'maintenance/converters';
	}
	
	function joobb() { 	

		$this->model->start();
		$this->model->export_users_joobb();
		$this->model->export_forums_joobb();
		$this->model->export_posts_joobb();
		//$this->model->end();
		
		Agora::showMessage(Agora::lang('SUCCESS CONV'));
		$this->view->template = 'maintenance/converters';
	}
}

?>
